package com.ruoyi.combat.service.userlocation.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.combat.mapper.userlocation.CombatRelationWarnMapper;
import com.ruoyi.combat.domain.userlocation.CombatRelationWarn;
import com.ruoyi.combat.service.userlocation.ICombatRelationWarnService;

/**
 * 关联风险警告Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-10
 */
@Service
public class CombatRelationWarnServiceImpl implements ICombatRelationWarnService 
{
    @Autowired
    private CombatRelationWarnMapper combatRelationWarnMapper;

    /**
     * 查询关联风险警告
     * 
     * @param id 关联风险警告主键
     * @return 关联风险警告
     */
    @Override
    public CombatRelationWarn selectCombatRelationWarnById(Long id)
    {
        return combatRelationWarnMapper.selectCombatRelationWarnById(id);
    }

    /**
     * 查询关联风险警告列表
     * 
     * @param combatRelationWarn 关联风险警告
     * @return 关联风险警告
     */
    @Override
    public List<CombatRelationWarn> selectCombatRelationWarnList(CombatRelationWarn combatRelationWarn)
    {
        return combatRelationWarnMapper.selectCombatRelationWarnList(combatRelationWarn);
    }

    /**
     * 新增关联风险警告
     * 
     * @param combatRelationWarn 关联风险警告
     * @return 结果
     */
    @Override
    public int insertCombatRelationWarn(CombatRelationWarn combatRelationWarn)
    {
        combatRelationWarn.setCreateTime(DateUtils.getNowDate());
        return combatRelationWarnMapper.insertCombatRelationWarn(combatRelationWarn);
    }

    /**
     * 修改关联风险警告
     * 
     * @param combatRelationWarn 关联风险警告
     * @return 结果
     */
    @Override
    public int updateCombatRelationWarn(CombatRelationWarn combatRelationWarn)
    {
        return combatRelationWarnMapper.updateCombatRelationWarn(combatRelationWarn);
    }

    /**
     * 批量删除关联风险警告
     * 
     * @param ids 需要删除的关联风险警告主键
     * @return 结果
     */
    @Override
    public int deleteCombatRelationWarnByIds(Long[] ids)
    {
        return combatRelationWarnMapper.deleteCombatRelationWarnByIds(ids);
    }

    /**
     * 删除关联风险警告信息
     * 
     * @param id 关联风险警告主键
     * @return 结果
     */
    @Override
    public int deleteCombatRelationWarnById(Long id)
    {
        return combatRelationWarnMapper.deleteCombatRelationWarnById(id);
    }
}
